﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Project.DTO;

// ReSharper disable once IdentifierTypo
namespace Project.IBLL
{
    /// <summary>
    /// IBLL 层中的基类接口
    /// 方法以 "_" 开头
    /// </summary>
    public interface IBaseManager<in TD> where TD : BaseEntityDto, new()
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task _Add(TD dto);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task _Remove(TD dto);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task _Remove(long id);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task _Edit(TD dto);
    }
}
